package descentFly.away3D4.Generator
{
	import UIUtils.uif_util;
	
	import descentFly.away3D4.df_awaySpace;
	import descentFly.away3D4.df_points;
	import descentFly.away3D4.doors.df_door;
	import descentFly.df_optionsObject;
	import descentFly.away3D4.df_baseSpaceElement;
	
	public class df_doorGenerator extends df_baseSpaceElement {
		public function df_doorGenerator(a_space: df_awaySpace, a_options:Object) {
			super(a_space, a_options);
		}
		
		override protected function initialize(): void {
			super.initialize();
			createDoors();
		}
		
		protected function createDoors(): void {
			Space.points.items.forEach(function(point: Object, i: int, arr: Array): void {
				if (point.type == df_points.TYPE_DOOR) {
					var door: df_door = new (options.doorTmpl.Class)(
						Space, 
						uif_util.union(options.doorTmpl.options, point)
					);
//					door.body.skin.transform = 
				}
			});
		}
	}
}